require(['grid', 'topBar', 'layout','date'], function () {
	var carIds="";//左侧树状图选中的车辆id
    $('body').layout();
    $('#top').topBar({       
        left: [{
                   type: 'filter-more',
                   dateType:'custom',
                   search: function () {
					},
                   item: [
                       {
                           text: '时间快捷',
                           name1: 'beginTime',
                           name2: 'endTime',
                           type: 'dateLine'
                       },
                       {
                           text: '严重度',
                           name: 'componentType',
                           type: 'item-select',
                           data: [
                               {text: '严重', value: '01'},
                               {text: '一般', value: '02'},
                               {text: '警告', value: '03'}
                           ]
                       },
                       {
                           text: '类型',
                           name: 'componentType',
                           type: 'item-select',
                           data: [
                               {text: '新胎', value: '01'},
                               {text: '翻胎', value: '02'}
                           ]
                       },
                       {
                           text: '故障类型',
                           name: 'componentType',
                           type: 'item-select',
                           data: [
                               {text: '漏气', value: '01'},
                               {text: '高压报警', value: '02'},
                               {text: '高温报警', value: '03'},
                               {text: '低压报警', value: '04'}
                           ]
                       }
                   ]
               }],
        right: [
            {
                text: '导出',
                type: 'export-btn',
                authority: '',
                item: [
                    {
                        text: 'Excel导出',
                        click: function () {
                        }
                    },
                    {
                        text: 'PDF导出',
                        click: function () {
                        }
                    }
                ]
            }
        ]
    });

    $('#grid').grid({
		data:[
			{rcrdId:"1",beginLoLgt:"A647",beginLoLtt:"泉州二公司",beginLoDrc:"米其林",licPltNo:"新胎",lineName:"295/80R22.5",organName:"漏气",mftGradeName:"严重",ecuMftName:"2014/6/12 8:20",mftTypeName:"2014/6/13 8:20",spdOfMotVhi:"未解决",status:"运行状态"},
			{rcrdId:"2",beginLoLgt:"A648",beginLoLtt:"泉州二公司",beginLoDrc:"米其林",licPltNo:"新胎",lineName:"295/80R22.5",organName:"高温报警",mftGradeName:"严重",ecuMftName:"2014/6/12 8:20",mftTypeName:"2014/6/12 8:20",spdOfMotVhi:"未解决",status:"运行状态"},
			{rcrdId:"3",beginLoLgt:"A648",beginLoLtt:"泉州二公司",beginLoDrc:"米其林",licPltNo:"新胎",lineName:"295/80R22.5",organName:"低温报警",mftGradeName:"一般",ecuMftName:"2014/6/12 8:20",mftTypeName:"2014/6/25 8:20",spdOfMotVhi:"未解决",status:"运行状态"}
		],
		colModel : [ 
		    {name : "rcrdId", label: "id",key : true,hidden : true},
			{name : "beginLoLgt", label: "车辆"},
			{name : "beginLoLtt", label: "公司"},
			{name : "beginLoDrc", label: "品牌"},
			{name : "licPltNo", label: "类型"},
			{name : "lineName", label: "规格"},
			{name : "organName", label: "故障名称"},
			{name : "mftGradeName", label: "严重度"},
			{name : "ecuMftName", label: "发生时间"},
			{name : "mftTypeName", label: "解决时间"},
			{name : "spdOfMotVhi", label: "状态"},
			{name : "status", label: "运行状态"}]		
    });
    
})
